package cn.luischen.utils;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
import com.vdurmont.emoji.EmojiParser;
import cn.luischen.constant.WebConst;
import cn.luischen.model.ContentDomain;

import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.rules.ExpectedException;
import org.junit.Test;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import java.lang.reflect.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.Map;
import java.util.List;
import com.unitspirit.runtime.*;

/**
 * The class <code>Job_WGTest</code> contains tests for the class <code>{@link Job}</code>.
*
* @generatedBy UnitSpirit CreateTemplateTestFile4
* @version 1.0.9.11 
*/
@PowerMockIgnore({ "javax.management.*" })
@RunWith(PowerMockRunner.class)
@PrepareForTest({ cn.luischen.utils.TaleUtils.class })
public class Commons_gravatar_WGTest {
	@Rule
	public ExpectedException unitspirit_thrown = ExpectedException.none();

	/**
	* 测试方法初始化.
	* 
	* @throws Exception 
	*         if the initialization fails for some reason 
	*  
	* @generatedBy UnitSpirit at 2021-09-07 17:52:09
	*/
	@org.junit.Before
	public void setUp() throws Exception {
		try {
			GlobalUnitInit.init();
			MockitoAnnotations.initMocks(this);
			ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
	* @date 2021-09-07 17:52:09
	* @see cn.luischen.utils.Commons#gravatar
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_gravatar_0113_190013_896_0_01() throws Throwable {
		String String_p_0 = "1034683568@qq.com";
		//返回值定义 
		String result_expected = "\"https://github.com/identicons/afe94ddc67b57b89f353a02e1ffe3ede.png\"";

		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
		java.lang.String mock_result_String1 = "\"afe94ddc67b57b89f353a02e1ffe3ede\"";

		PowerMockito.when(cn.luischen.utils.TaleUtils.MD5encode(anyString())).thenReturn(mock_result_String1);

		String unitspirit_result = cn.luischen.utils.Commons.gravatar(String_p_0);
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:10
	* @see cn.luischen.utils.Commons#gravatar
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_gravatar_0113_190013_896_0_02() throws Throwable {
		String String_p_0 = "1034683568@qq.com";
		//返回值定义 
		String result_expected = "\"https://github.com/identicons/afe94ddc67b57b89f353a02e1ffe3ede.png\"";

		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
		java.lang.String mock_result_String1 = "\"afe94ddc67b57b89f353a02e1ffe3ede\"";

		PowerMockito.when(cn.luischen.utils.TaleUtils.MD5encode(anyString())).thenReturn(mock_result_String1);

		String unitspirit_result = cn.luischen.utils.Commons.gravatar(String_p_0);
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:10
	* @see cn.luischen.utils.Commons#gravatar
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_gravatar_0113_190013_896_1_01() throws Throwable {
		String String_p_0 = "1034683568@qq.com";
		//返回值定义 
		String result_expected = "\"https://github.com/identicons/afe94ddc67b57b89f353a02e1ffe3ede.png\"";

		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
		java.lang.String mock_result_String1 = "\"afe94ddc67b57b89f353a02e1ffe3ede\"";

		PowerMockito.when(cn.luischen.utils.TaleUtils.MD5encode(anyString())).thenReturn(mock_result_String1);

		String unitspirit_result = cn.luischen.utils.Commons.gravatar(String_p_0);
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:10
	* @see cn.luischen.utils.Commons#gravatar
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_gravatar_0113_190013_896_1_02() throws Throwable {
		String String_p_0 = "1034683568@qq.com";
		//返回值定义 
		String result_expected = "\"https://github.com/identicons/afe94ddc67b57b89f353a02e1ffe3ede.png\"";

		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
		java.lang.String mock_result_String1 = "\"afe94ddc67b57b89f353a02e1ffe3ede\"";

		PowerMockito.when(cn.luischen.utils.TaleUtils.MD5encode(anyString())).thenReturn(mock_result_String1);

		String unitspirit_result = cn.luischen.utils.Commons.gravatar(String_p_0);
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:10
	* @see cn.luischen.utils.Commons#gravatar
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_gravatar_20210722_100105_711_1_01() throws Throwable {
		String String_p_0 = "1034683568@qq.com11";
		//返回值定义 
		String result_expected = "https://github.com/identicons/e1e3f5856a17a31e061ccb5c3099532c.png";

		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
		java.lang.String mock_result_String1 = "e1e3f5856a17a31e061ccb5c3099532c";

		PowerMockito.when(cn.luischen.utils.TaleUtils.MD5encode(anyString())).thenReturn(mock_result_String1);

		String unitspirit_result = cn.luischen.utils.Commons.gravatar(String_p_0);
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:52:10
	* @see cn.luischen.utils.Commons#gravatar
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_gravatar_20210722_100105_711_1_02() throws Throwable {
		String String_p_0 = "1034683568@qq.com11";
		//返回值定义 
		String result_expected = "https://github.com/identicons/e1e3f5856a17a31e061ccb5c3099532c.png";

		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
		java.lang.String mock_result_String1 = "e1e3f5856a17a31e061ccb5c3099532c";

		PowerMockito.when(cn.luischen.utils.TaleUtils.MD5encode(anyString())).thenReturn(mock_result_String1);

		String unitspirit_result = cn.luischen.utils.Commons.gravatar(String_p_0);
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}
}
